1. The Field of the Invention
The present invention relates to analyzing bus traffic or data. The present invention relates to systems and methods for analyzing bus data or traffic using a trace packet, and more particularly to systems and methods for analyzing serial bus data using a trace packet that can be generated by more than one software module or device driver.
2. Background and Relevant Art
One of the primary advantages of the protocols such as Universal Serial Bus (USB) and IEEE 1394 is the ability able to handle a high data transfer rate. USB 1.1, for example, supports data transfer speeds up to 12 Megabits per second, while USB 2.0 supports data transfer rates up to 480 Megabits per second. Another advantage of the USB protocol is the ability to support 127 devices from a single USB port. In addition, USB also simplifies the connection of external devices.
Simply stated, these serial bus protocols enable increased data transfer speeds between devices. In any system, however, there are various problems that can occur between devices and their hosts. One of the ways that these problems are resolved is through the use of protocol analyzers. Protocol analyzers are able to monitor the bus to which they are connected and alert users to abnormal bus or protocol conditions.
One of the problems encountered with serial bus protocols is that the lower level protocols for transferring the data are becoming independent of the upper level protocols that the devices use on top of these bus protocols. USB, for example, allows generic access to multiple devices. Consequently, the bus traffic will reflect simple protocols that are independent of the devices and their higher level protocols that use the lower level bus protocols. As a result, it is now more difficult to discover specific protocol transition points or other problems.
Protocol analyzers can help overcome these types of problems by providing a snapshot of the bus traffic that was present around the time that the problems occurred. In other words, protocol analyzers can read packets from the serial bus and store the packets in a file or cache for further analysis. The packets can be extracted at a later time and/or filtered using various parameters or characteristics such as packet type.
Protocol analyzers can be programmed to trigger on certain events. Protocol analyzers snoop packets that are transmitted on the serial bus looking for those events as well as other abnormal conditions or events. When one of those events is detected, the protocol analyzer triggers and captures all data on the bus. The captured data is typically stored in a large cache that can be dumped to a file. Depending on the trigger event, the protocol analyzer may simply stop recording data on the bus. In this situation, the cache will store information that was on the bus prior to the trigger event. Alternatively, the trigger can be set such that the cache is filled with data that occurred after the trigger event. Finally, the trigger can be set such that the cache contains some combination of data that was on the bus both before and after the trigger event.
While the ability to program a trigger event is useful, it is sometimes difficult to program the protocol analyzer to trigger on unknown problems. For example, a problem may occur with a device even though the protocol is operating in a normal fashion. In other words, it is very difficult to cause the protocol analyzer to trigger when the software determines that there is a problem with a device or in the communication with a device because there may be nothing abnormal with respect to the protocol. Thus, the protocol analyzer does not trigger and the communication between the host and the device that existed at the time the problem was initially detected is difficult to ascertain and may not be captured. For this reason, random problems and other unexplained failures are difficult to analyze using protocol analyzers because they do not trigger the protocol analyzer and the data or traffic on the bus cannot be analyzed because it was not captured.